package com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties;

import com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.nested.ReqDecryptProperties;
import com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.nested.RespEncryptProperties;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.validation.annotation.Validated;

/**
 * zoo对请求响应的加解密配置
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
@Data
@Validated
@ConfigurationProperties(prefix = "zoo.req-resp-enc-dec")
public class ZooReqrespEncdecProperties {
    
    /**
     * 响应加密
     */
    @Valid
    @NotNull
    @NestedConfigurationProperty
    private RespEncryptProperties respEncrypt = new RespEncryptProperties();
    
    /**
     * 请求解密
     */
    @Valid
    @NotNull
    @NestedConfigurationProperty
    private ReqDecryptProperties reqDecrypt = new ReqDecryptProperties();
    
    
}
